<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CRM服务管理平台</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/default/generic/frame/global.css" type="text/css"/>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/default/generic/frame/index.css" type="text/css"/>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/default/generic/frame/menu.css" type="text/css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/default/common/jquery-1.7.2.min.js"></script>
<script src="${pageContext.request.contextPath}/js/default/generic/frame/cfcoda.js" language="javascript"></script>
<script src="${pageContext.request.contextPath}/js/default/generic/frame/time.js" language="javascript"></script>
<!--[if lt IE 7]>       
 <script src="js/fixPNG.js"></script>         
 <script>
 DD_belatedPNG.fix('img,.nav ul li a,.nav ul li a:hover');
 </script>     
<![endif]-->
<link href="${pageContext.request.contextPath}/css/default/generic/frame/lanrenzhijia.css" rel="stylesheet" type="text/css" />
<script>
   var parentMenu = eval('${jsonParent}');
   var childMenu = eval('${jsonChild}');
   $(function(){
	  var parentstr = "";//首页大图
	  var childstr = "";//首页第一个大图的小图
	  for(var p=0,k=parentMenu.length;p<k;p++){
		  var iconN=p+1;
		  parentstr +="<li><p>"+parentMenu[p].name+"</p><a href=\"#\" onclick=\"changeMenuContent('"+parentMenu[p].csid+"');return false;\">" +
        "<img src=\"${pageContext.request.contextPath}/images/default/generic/frame/icon_"+iconN+".png\" width=\"56\" height=\"58\" /></a></li>"
	  }
	  $(".desktop_wrap").html(parentstr);
	  changeMenuContent(parentMenu[0].csid);
   });
   //改变首页菜单
   function changeMenuContent(parentid){
	   var childstrOne = "";
	   var childstrTwo = "";
	   var k = childMenu.length;
	   var newChild=[];
	   //将childMenu与parentid相同的找出来
	   for(var i=0;i<k;i++){
		   var childTemp={};
		   if(childMenu[i].parentid==parentid){
			   childTemp["raid"]=childMenu[i].raid;
			   childTemp["name"]=childMenu[i].name;
			   childTemp["parentid"]=childMenu[i].parentid;
			   childTemp["link"]=childMenu[i].link;
			   childTemp["icon"]=childMenu[i].icon;
			   childTemp["enname"]=childMenu[i].enname;
			   childTemp["csid"]=childMenu[i].csid;
			   newChild.push(childTemp);
		   }
	   }
	   var cl = newChild.length;
	   if(cl>24){
	      for(var i=0;i<24;i++){
	    	  //addTab五个参数
	    	  var iconN=i+1;//临时用它,正确选择是取icon
           	 childstrOne +="<li><a href=\"#\" onclick=\"parent.addTab('"+newChild[i].link+"','"+newChild[i].name+"','','0','"+newChild[i].raid+"')\" title=\""+newChild[i].name+"\">" +
           	 "<span><img src=\"${pageContext.request.contextPath}/images/default/generic/frame/icon_"+iconN+".png\" width=\"56\" height=\"61\" /></span><p>"+newChild[i].name+"</p>" +
           	 "</a></li>";
	     }
	     for(var i=24;i<cl;i++){
	    	 childstrTwo +="<li><a href=\"#\" onclick=\"parent.addTab('"+newChild[i].link+"','"+newChild[i].name+"','','0','"+newChild[i].raid+"')\" title=\""+newChild[i].name+"\">" +
           	 "<span><img src=\"${pageContext.request.contextPath}/images/default/generic/frame/icon_"+iconN+".png\" width=\"56\" height=\"61\" /></span><p>"+newChild[i].name+"</p>" +
           	 "</a></li>";
	     }
	   }else{
		   for(var i=0;i<cl;i++){
	    	  //addTab五个参数
	    	  var iconN=i+1;
           	 childstrOne +="<li><a href=\"#\" onclick=\"parent.addTab('"+newChild[i].link+"','"+newChild[i].name+"','','0','"+newChild[i].raid+"')\" title=\""+newChild[i].name+"\">" +
           	 "<span><img src=\"${pageContext.request.contextPath}/images/default/generic/frame/icon_"+iconN+".png\" width=\"56\" height=\"61\" /></span><p>"+newChild[i].name+"</p>" +
           	 "</a></li>";
	     }
	   }
	   $("#paneone").html(childstrOne);
	   $("#panetwo").html(childstrTwo);
   }
</script>
</head>
<body >
<!-- content -->
<div  style="position:relative;">
  
   <div id="frame">
   <div id="scroller">
    <div id="content">
       <div class="section" id="pane-0">
        <div class="page1">
           <div class="content">
            <div class="first_screen">
               <div class="weather">
                <div class="today"> <img src="${pageContext.request.contextPath}/images/default/generic/weather/${photo}" width="70" height="60" /> <span>${temperature}</span> </div>
                <div class="city"><a>${city}</a></div>
                <div class="clear"></div>
                <div class="refresh"><span class="fleft">更新时间${hhmm}</span><!--  <a href="#" class="fright">刷新</a> --></div>
              </div>
               <div class="time"> <span id="h1"></span> <span id="h2"></span><strong>:</strong> <span id="m1"></span> <span id="m2"></span><strong>:</strong> <span id="s1"></span> <span id="s2"></span> </div>
               <div class="date" id="currentime"></div>
               <div class="welcome_wz"><img src="${pageContext.request.contextPath}/images/default/generic/frame/welcome_wz.png" width="400" height="112" /></div>
             </div>
          </div>
         </div>
      </div>
        <div class="section" id="pane-1" style="display:none">
        <div class="page1">
           <div class="content">
            <div class="second_screen">
               <ul id="paneone">
               <!-- 
                <li><a href="#" onclick="parent.addTab('toBusiness.action','组织机构','','0','2')" title="组织机构"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_1.png" width="56" height="61" /></span>
                  <p>组织机构1</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','机构人员')" title="机构人员"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_2.png" width="56" height="58" /></span>
                  <p>机构人员1</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','工作日志')" title="工作日志"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_3.png" width="64" height="57" /></span>
                  <p>工作日志</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考勤管理')" title="考勤管理"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_4.png" width="64" height="62" /></span>
                  <p>考勤管理</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','指标设置')" title="指标设置"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_5.png" width="60" height="58" /></span>
                  <p>指标设置</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考核审批')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_6.png" width="61" height="63" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考核审批1')" title="考核审批1"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_7.png" width="64" height="48" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考核审批2')" title="考核审批2"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_8.png" width="45" height="60" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考核审批3')" title="考核审批3"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_9.png" width="59" height="60" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考核审批4')" title="考核审批4"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_10.png" width="63" height="63" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考核审批5')" title="考核审批5"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_11.png" width="52" height="60" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','考核审批6')" title="考核审批6"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_12.png" width="60" height="60" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_13.png" width="64" height="63" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_14.png" width="60" height="63" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_15.png" width="59" height="61" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_16.png" width="54" height="52" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_17.png" width="51" height="57" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_18.png" width="61" height="61" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_19.png" width="52" height="63" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_20.png" width="61" height="60" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_21.png" width="64" height="64" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_22.png" width="60" height="62" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_23.png" width="50" height="60" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_24.png" width="50" height="63" /></span>
                  <p>考核审批</p>
                  </a></li>
                   -->
              </ul>
             </div>
          </div>
         </div>
      </div>
       <div class="section" id="pane-2" style="display:none">
        <div class="page1">
           <div class="content">
            <div class="second_screen">
               <ul id="panetwo">
               <!-- 
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="组织机构"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_1.png" width="56" height="61" /></span>
                  <p>组织机构2</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="机构人员"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_2.png" width="56" height="58" /></span>
                  <p>机构人员2</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="工作日志"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_3.png" width="64" height="57" /></span>
                  <p>工作日志</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考勤管理"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_4.png" width="64" height="62" /></span>
                  <p>考勤管理</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="指标设置"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_5.png" width="60" height="58" /></span>
                  <p>指标设置</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_6.png" width="61" height="63" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_7.png" width="64" height="48" /></span>
                  <p>考核审批</p>
                  </a></li>
                <li><a href="#" onclick="parent.addTab('list.html','组织机构')" title="考核审批"><span><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_8.png" width="45" height="60" /></span>
                  <p>考核审批</p>
                  </a></li>
                -->
              </ul>
             </div>
          </div>
         </div>
      </div>
     </div>
  </div>
   <div id="switch">
    <div id="switch-content">
       <ul id="toolbar" class="navigation">
        <li id="tab-0" class="active"><a href="#" id="aaa" onclick="javascript:ScrollSection(0, 'scroller', 'home-pane'); return false"></a></li>
        <li id="tab-1" class="inactive"><a href="#" onclick="javascript:ScrollSection(1, 'scroller', 'home-pane'); return false"></a></li>
        <li id="tab-2" class="inactive"><a href="#" onclick="javascript:ScrollSection(2, 'scroller', 'home-pane'); return false"></a></li>
      </ul>
     </div>
  </div>
   <div class="clear"></div>
   <!-- -->
   <div class="main_desktop">
    <ul class="desktop_wrap">
    <!--
       <li>
        <p>通讯录</p>
        <a href="#" onclick="window.top.addTab('list.html','通讯录');return false;"><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_2.png" width="56" height="58" /></a></li>
       <li>
        
        <p>工作任务</p>
        <a href="#" onclick="parent.addTab('list.html','工作任务')"><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_3.png" width="64" height="57" /></a></li>
       <li>
        <p>项目管理</p>
        <a href="#" onclick="parent.addTab('list.html','项目管理')"><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_4.png" width="64" height="62" /></a></li>
       <li>
        <p>控制面板</p>
        <a href="#" onclick="parent.addTab('list.html','控制面板')"><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_5.png" width="60" height="58" /></a></li>
       <li>
        <p>即时提醒</p>
         <a href="#" onclick="parent.addTab('list.html','及时提醒')"><img src="${pageContext.request.contextPath}/images/default/generic/frame/icon_6.png" width="61" height="63" /></a></li>
         -->  
      </ul>
  </div>
 </div>
 </div>
</body>
</html>

